﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WaterDrop.Models;

namespace WaterDrop.Controllers
{
    public class ApiController : Controller
    {
        private string root = "http://172.16.102.65/wxapi/v1/public";
        // 发送短信
        public ActionResult GetSMS(string mobile)
        {
            var url = root + "/vcode/invite_vcode";
            var model = new SmsModel()
            {
                mobile = mobile
            };
            var result = HttpHelper.SendRequest(model.ToJson(), url);
            return Content(result);
        }
        //申请邀请码
        [HttpPost]
        public ActionResult GetCode(CodeModel model)
        {
            var url = "invite_code_apply";
            var result = HttpHelper.SendRequest(model.ToJson(), url);
            return Content(result);
        }

    }
}